package com.itheima.service;

import com.itheima.template.OosTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

@Service
public class OosService {
    @Autowired
    private OosTemplate oosTemplate;

    public String upload(MultipartFile photoFile) throws IOException {
        String upload = oosTemplate.upload(photoFile.getOriginalFilename(), photoFile.getInputStream());
        return upload;
    }
}
